package com.lonely.product.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lonely.common.core.domain.StatusInfo;
import com.lonely.product.domain.dto.cuttingbed.AlreadyLabelRackDTO;
import com.lonely.product.domain.dto.cuttingbed.QueryCuttingBedPageDTO;
import com.lonely.product.domain.dto.cuttingbed.StartCuttingDTO;
import com.lonely.product.domain.dto.cuttingbed.TypeInCuttingQuantitySubmitDTO;
import com.lonely.product.domain.entity.SysCuttingBed;
import com.lonely.product.domain.vo.cuttingbed.QueryCuttingBedPageVO;
import com.lonely.product.domain.vo.cuttingbed.TypeInCuttingQuantityDetailVO;
import com.lonely.purchase.domain.entity.SysMaterialPurchase;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/7/24 14:00
 * @description: 裁床服务
 */
public interface ICuttingBedService extends IService<SysCuttingBed> {


    /**
     * 裁床分页查询
     *
     * @param queryDto
     * @return
     */
    Page<QueryCuttingBedPageVO> page(QueryCuttingBedPageDTO queryDto);

    /**
     * 已排唛架
     *
     * @param alreadyLabelRackDTO
     */
    void alreadyLabelRack(AlreadyLabelRackDTO alreadyLabelRackDTO);

    /**
     * 开始裁床
     *
     * @param startCuttingDTO
     */
    void startCutting(StartCuttingDTO startCuttingDTO);

    /**
     * 查询录入裁床数详情数据
     *
     * @param cuttingId
     * @return
     */
    TypeInCuttingQuantityDetailVO typeInCuttingQuantityDetail(Long cuttingId);

    /**
     * 录入裁床数
     *
     * @param submitDto
     */
    void typeInCuttingQuantity(TypeInCuttingQuantitySubmitDTO submitDto);

    /**
     * 判断该订单是否已存在裁床数据
     *
     * @param produceOrderId
     * @return
     */
    boolean alreadyExistsCuttingBed(Long produceOrderId);

    /**
     * 生成待排唛架状态的裁床单
     *
     * @param materialPurchase
     */
    void createToBeLabelRackCuttingBed(SysMaterialPurchase materialPurchase);

    /**
     * 获取裁床管理状态信息
     *
     * @param queryDto
     * @return
     */
    List<StatusInfo> getStatusInfo(QueryCuttingBedPageDTO queryDto);

    /**
     * 获取指定订单号对应的裁床数
     *
     * @param produceOrderId
     * @return
     */
    Integer getCuttingBedQuantity(Long produceOrderId);
}
